home *** CD-ROM | disk | FTP | other *** search
/ The Atari Compendium / The Atari Compendium (Toad Computers) (1994).iso / files / prgtools / programm.ing / falcon / nt_dsp1.lzh / NT_DSP1.MSA / LFLTS / LATIIRT.ASM < prev    next >
Encoding:
Assembly Source File  |  1989-01-24  |  1.4 KB  |  46 lines

  1. ;
  2. ; This program originally available on the Motorola DSP bulletin board.
  3. ; It is provided under a DISCLAMER OF WARRANTY available from
  4. ; Motorola DSP Operation, 6501 Wm. Cannon Drive W., Austin, Tx., 78735.
  5. ; Lattice IIR Filter Macro. (test program)
  6. ; Last Update 31 Jul 86   Version 1.0
  7. ;
  8. ;
  9. ;       LATTICE IIR
  10. ;
  11.         opt     cex
  12.         page    132,66,0,10
  13.         nolist
  14.         include 'dsplib:ioequ'
  15.         list
  16.         include 'dsplib:latiir'
  17.  
  18.  
  19. order   equ     3               ;three coefficient lattice
  20. datin   equ     $ffff           ;location of input file
  21. datout  equ     $fffe           ;location of output file
  22. npts    equ     20              ;number of points to process
  23.  
  24.         org     x:0
  25. kadd    dc      .5,-.5,.8       ;filter reflection coefficients
  26.         org     y:0
  27. state   ds      3               ;filter states
  28.  
  29.         org     p:$100
  30. start
  31.         movep   #0,x:M_BCR      ;no wait states on external i/o
  32.  
  33.         move    #kadd+order-1,r0        ;point to k's
  34.         move    #order-1,m0             ;mod order
  35.         move    #state,r4               ;point to state variables
  36.         move    #order-1,m4             ;mod order
  37.  
  38.         do      #npts,_endp             ;filter some points
  39.         move    y:datin,a               ;get input sample
  40.         latiir  order                   ;filter it
  41.         move    a,y:datout              ;output sample
  42. _endp
  43.         END
  44.